<?php

include_once("config.php");
include_once("db_connect.php");
include_once("restrito.php");

//pegar o id do evento atual
$id_evento = 1;
$titleEvento = "VI JORNADA DE SERVIÇO SOCIAL";
$operacao = "Palestrantes";
$dica = "Gerencie seus palestrantes."; 

$sql = "SELECT * FROM ".$prefixo."palestrante  WHERE evento_id = '".$id_evento."'";



$result = mysql_query($sql);

if(isset($_GET[action])){
	echo $_GET[action];	
}



?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Eventos Acadêmicos</title>
<link href="blueprint/screen.css" rel="stylesheet" type="text/css" media="all" />
<link href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<script src="http://code.jquery.com/jquery-1.9.0.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.0/jquery.validate.js" ></script>
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>

<script src="js/functions.js"></script>

</head>
<body>
<!--<div id="mask"></div>-->


<div id="wrapper">

<div id="header">
	<div id="logo_instituicao">
    	<img src="<?php echo $logo_instituicao; ?>" alt="Logo" />
    </div>
    <div id="logo_sistema">
    	<img src="<?php echo $logo_sistema; ?>" alt="" />
    </div>
</div>
<div id="content">
	<div id="sidebar">
    	<?php include("user_info_inc.php"); ?>
        <?php loadMenu("evento");?>
    </div>
    <div id="main_content">
   	  <div id="notifications">
   	  <?php 
   	  	if(isset($_SESSION["system_info"]) && $_SESSION["system_info"] != ""){
			echo '<div class="info">'.$_SESSION["system_info"].'</div>';
		}
   	  ?>
   	  </div>
      

      <div id="boxTitlePage">
		 <span class="title"><?php echo $titleEvento. " > " .$operacao; ?></span>
		 <span><?php echo $dica;?></span>
	  </div>
      
      <a href="controller/palestranteController.php?action=novo" class="botao_right botaoGoogleBlue">Novo Palestrante</a>
        
      <table width="100%" border="0">
  <tr>
    <!--<th scope="col">ID</th>-->
    <th scope="col">&nbsp;</th>
    <th scope="col">PALESTRANTE</th>
    <th scope="col">EMAIL</th>
    <th scope="col">TELEFONE</th>
    <th scope="col">LINK LATTES</th>
    <th scope="col">&nbsp;</th>
    <!--<th scope="col">&nbsp;</th>-->
  </tr>
  <?php
  while($dados = mysql_fetch_assoc($result)){
  ?>
  <tr>
    <!-- <td><?php //echo $dados["id"];?></td> -->
    <td width="40">
    <?php
            if($dados["foto"] != ""){
				echo '<img src="images/fotos/'.$dados["foto"].'" alt="Foto" width="40" height="40" style="border-radius: 20px;border: 1px solid #f3f3f3;"/><br />';
			}else{
				echo '<img src="avatar.jpg" alt=""  width="40" height="40" style="border-radius: 20px;border: 1px solid #f3f3f3;"/><br />';
			}
    ?>
    </td>
    <td><?php echo utf8_encode($dados["nome"]);?></td>
    <td><?php echo utf8_encode($dados["email"]);?></td>
    <td><?php echo utf8_encode($dados["telefone"]);?></td>
    <td><?php echo utf8_encode($dados["link_lattes"]);?></td>
    <?php
	if($_SESSION["req_user_nivel"] == "1"){
	?>
    <td style='width: 5%'><a href="controller/usuarioController.php?action=editar&id=<?php echo $dados["id"];?>" class="botao_right botaoGoogleGrey">Editar</a></td>
    <!--<td style='width: 5%'><a href="controller/usuarioController.php?action=excluir&id=<?php //echo $dados["id"];?>" class="botao_right botaoGoogleRed">Excluir</a></td>-->
    
    <?php
	
	}else{
		?>
		<td style='width: 5%;height: 35px;'>&nbsp;</td>
		
	<?php
    }//fecha if
    ?>
  </tr>
  <?php
  }
  ?>
</table>
        
        
    </div>
</div>
<div id="footer">
	<div id="developers">
    	<img src="<?php echo $logo_developer; ?>" />
    </div>
    <div id="footer_address">
    	<?php echo $nome_faculdade_completo; ?><br />
        <?php echo $endereco_faculdade; ?>
    </div>
</div>
</div><!-- fecha wrapper-->

</body>
</html>
